﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Data;
using TencentWeiboSDK.Model;
using System.Collections.Generic;

namespace QWeiBoN.Converter
{
    public class StatusNameAndImageConverter : IValueConverter
    {

        #region IValueConverter 成员

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (null == value)
            {
                return string.Empty;
            }

            Status status = (value as Status);

            if (null == status || null == status.Image || status.Image.Count <= 0)
            {
                return string.Empty;
            }

            List<Object> list = (status.Image as List<Object>);
            return list[0].ToString() + "/160";
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
